package com.tang.algorithm.array;/**
 * @author tlm
 * @date 2020/5/27 22:21
 * @version 1.0
 */


public class LeetCode01 {
    public static void main(String[] args) {
        int[] guess = {1,2,3};
        int[] answer = {1,2,3};
        System.out.println(game(guess, answer));
    }
    public static int game(int[] guess, int[] answer) {
        int res= 0;
        for (int i = 0; i <guess.length ; i++) {
            if(guess[i]==answer[i]) res++;
        }
        return res;
    }
}
